Fix UI config conversion yet again #4128
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a bug with the UI config camelCase conversion, which I came across while running #4107. While it does not cause an actual issue right now, when #4107 merges this issue will cause the front page configuration to break, due to
sortBy
not being converted tosort_by
and instead being stored in the config file assortBy
.The change in viper that triggers the bug is spf13/viper#1387, which is in viper v1.13.0 (we're currently on v1.10.1, and #4107 updates to v1.16.0).
Unfortunately, the key in the config file will only be converted from
sortBy
tosort_by
when the UI configuration is next saved. This means that merging #4107 will cause an issue - either we wait to update viper, or fix the config file automatically in some way.